import request from "@/plugins/request";

var pre = "";

if (process.env.NODE_ENV !== "development") {
  pre = "/api/sa/conv-access" + pre;
}

// 我的邀请列表
export function pageFormyInvitation(data) {
  return request({
    url: `${pre}/visitors/pageFormyInvitation`,
    method: "post",
    data,
  });
}

// 新增我的邀请信息
export function addVisitors(data) {
  return request({
    url: `${pre}/visitors/add`,
    method: "post",
    data,
  });
}

// 取消我的邀请
export function delVisitors(data) {
  return request({
    url: `${pre}/visitors/del`,
    method: "post",
    data,
  });
}

// 我的邀请详情
export function getById(visitorsId) {
  return request({
    url: `${pre}/visitors/get?visitorsId=${visitorsId}`,
    method: "GET",
  });
}

// 查看邀请码 / 二维码
export function getBatchById(data) {
  return request({
    url: `${pre}/visitors/getBatchById`,
    method: "post",
    data,
  });
}